<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"  prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"   prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" 	 prefix="fmt" %>
<%@ page import="grupobbva.pe.operhc.domain.SegUsuario"%>
<jsp:useBean id="now" class="java.util.Date" scope="request" />
<fmt:formatDate value="${now}" var="formattedDate" type="date" pattern="dd/MM/yyyy" />
<fmt:formatDate value="${now}" var="formattedTime" type="date" pattern="HH:mm:ss" />
<% SegUsuario usuarioSession = (SegUsuario)request.getSession().getAttribute("usuarioSession");%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Contrato - Gestor de Campañas</title>
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/ui.jqgrid.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/redmond/jquery-ui-1.8.2.custom.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/operhc_style.css" />
	<link rel="stylesheet" type="text/css" media="print"  href="<%=request.getContextPath()%>/css/print.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/buttonOHC.css" />
	
	<script type="text/javascript" src='<%= request.getContextPath()%>/dwr/interface/ConsultaActualAction.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/util.js'></script>
	<script src="<%=request.getContextPath()%>/js/util/gridUtil.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery-1.7.1.js" type="text/javascript"></script>	
	<script src="<%=request.getContextPath()%>/js/i18n/grid.locale-es.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery.jqGrid.src.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/grid.subgrid.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/util/encabezado.js" type="text/javascript"></script>
	
<script type="text/javascript" charset="UTF-8">

function printpage(){
	window.print();
}
</script>
</head>
<body>
<html:form styleId="formContrato" method="post" action="consultaActualForm.do?method=imprimirContratoGestorCampania">

<div style="font-size: xx-small; width: 100%; text-align: right;"><%=usuarioSession.getCodigo()%> | <c:out value="${sessionScope.usuarioHOST.oficinaPertenencia}"/> | <c:out value="${formattedDate}" /> | <c:out value="${formattedTime}" /></div>
<p />

<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
	
	<tr>
	<td align="left" width="30%">&nbsp;Nº Contrato Generado:</td>
	<td align="left" width="70%">
	&nbsp;<span><c:out value="${command.numeroContrato}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Fecha:</td>
	<td align="left">
	&nbsp;<span><c:out value="${currentDate}"/></span>
	</td>
	</tr>
	
	<tr><td colspan="2"><hr style="border-color: black;" /></td></tr>
	
	<tr>
	<td align="left">&nbsp;Cliente:</td>
	<td align="left">
	&nbsp;<span>DNI: <c:out value="${sessionScope.clienteSession.numeroDocumento}"/> - <c:out value="${sessionScope.clienteSession.razonSocial}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Segmento (Campaña):</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.segmentoCampania}"/></span>
	</td>
	</tr>
	
	<c:if test="${command.familia ne FAMILIA_TARJETAS}">
		<tr>
		<td align="left">&nbsp;Gestor:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.gestor}"/></span>
		</td>
		</tr>
	</c:if>
	
	<tr>
	<td align="left">&nbsp;Oficina:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.usuarioHOST.oficinaPertenencia}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Registro Vendedor:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.usuarioVendedor}"/> - <c:out value="${command.nombreCompletoVendedor}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Registro Usuario:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.usuarioSession.codigo}"/> - <c:out value="${sessionScope.usuarioSession.nombreCompleto}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Canal de Venta:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.canal}"/> - <c:out value="${command.desCanal}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Sub-Canal de Venta:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.subCanal}"/> - <c:out value="${command.desSubCanal}"/></span>
	</td>
	</tr>
	
	<tr><td colspan="2"><hr style="border-color: black;" /></td></tr>
	
	<tr>
	<td align="left">&nbsp;Producto:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.desProducto}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Sub-Producto:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.desSubProducto}"/></span>
	</td>
	</tr>
	
	<c:if test="${command.familia eq FAMILIA_TARJETAS}">
		
		<tr>
		<td align="left">&nbsp;Tipo:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.valTipo}"/></span>
		</td>
		</tr>
		
		<tr>
		<td align="left">&nbsp;Bin:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.valBin}"/></span>
		</td>
		</tr>
			
	</c:if>
	
	<tr>
	<td align="left">&nbsp;Divisa:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.divisa}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Importe:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.importe}"/></span>
	</td>
	</tr>
	
	<c:if test="${command.familia ne FAMILIA_TARJETAS}">
	
		<tr>
		<td align="left">&nbsp;Plazo:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.plazo}"/></span>
		</td>
		</tr>
		
		<tr>
		<td align="left">&nbsp;Tasa:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.tasa}"/></span>
		</td>
		</tr>
		
	</c:if>
	
</table>

<div id="divButtonPrint">
<br/>
<%--
<input type="button" value="Imprimir" onclick="printpage()" />
 --%>
 
&nbsp;<a href="#" onclick="printpage();" class="buttonOHC">IMPRIMIR</a>
</div>

</html:form>
</body>
</html>